package net.lab1024.smartadmin.module.weapp.orderstype.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentVO;
import net.lab1024.smartadmin.module.weapp.orderstype.domain.dto.WorkOrderTypeQueryDTO;
import net.lab1024.smartadmin.module.weapp.orderstype.domain.entity.WorkOrderTypeEntity;
import net.lab1024.smartadmin.module.weapp.orderstype.domain.vo.WorkOrderTypeVO;
import net.lab1024.smartadmin.module.weapp.orderstype.domain.vo.WorkOrderTypeExcelVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * [ 工单类型 ]
 *
 * @author wuqian
 * @version 1.0
 * @company 五千
 * @copyright (c)  五千Inc. All rights reserved.
 * @date 2021-03-12 09:13:38
 * @since JDK1.8
 */
@Mapper
@Component
public interface WorkOrderTypeDao extends BaseMapper<WorkOrderTypeEntity> {

    /**
     * 根据id 查新单个信息
     *
     * @return WorkOrderTypeVO
     */
    WorkOrderTypeVO queryById(@Param("id") Long id);
    /**
     * 获取所有类型列表
     *
     * @return List<WorkOrderTypeVO>
     */
    List<WorkOrderTypeVO> listAll();
    /**
     * 分页查询
     * @param queryDTO
     * @return WorkOrderTypeVO
    */
    IPage<WorkOrderTypeVO> queryByPage(Page page, @Param("queryDTO") WorkOrderTypeQueryDTO queryDTO);

    /**
     * 根据id删除
     * @param id
     * @return
    */
    void deleteById(@Param("id") Long id);

    /**
     * 根据id批量删除
     * @param idList
     * @return
    */
    void deleteByIdList(@Param("idList") List<Long> idList);

        /**
     * 查询所有导出数据
     * @param queryDTO
     * @return
     */
    List<WorkOrderTypeExcelVO> queryAllExportData(@Param("queryDTO") WorkOrderTypeQueryDTO queryDTO);

        /**
         * 查询批量导出数据
         * @param idList
         * @return
         */
    List<WorkOrderTypeExcelVO> queryBatchExportData(@Param("idList") List<Long> idList);
}
